export default {
  state:{
    name:'zhangsan'
  },
  mutations:{
    updatename(state,payload){
      state.name = payload
    }
  },
  getters:{
    fullname(state){
      return state.name + '拼接'
    },
    fullname2(state, getter){
      return getter.fullname + '第二次拼接'
    },
    fullname3(state,getter,rootState){
      return getter.fullname2 + rootState.counter
    }
  },
  actions:{
    aupdatename(context){
      setTimeout(()=>{
        context.commit('updatename','wangwu')
      },1000)
    }
  },
}
